package com.xingchi.framework.common.base;

import com.alibaba.fastjson2.util.DateUtils;

/**
 * 通用常量
 *
 * @author xingchi
 * @date 2022/8/18 23:19
 * @modified xingchi
 */
public interface Constant {

    /**
     * 数据库中通用字段名
     */
    class DataSourceFiled {
        public static final String ID = "id";
        public static final String CREATE_TIME = "createTime";
        public static final String UPDATE_TIME = "updateTime";
        public static final String CREATOR = "creator";
        public static final String MODIFIER = "modifier";
        public static final String DELETE_FLAG = "deleted";
        public static final String CREATE_TIME_DB = "create_time";
        public static final String UPDATE_TIME_DB = "update_time";
    }

    /**
     * 日期类型格式化相关常量
     */
    class DateTimeFormat {
        public static final String DATE_TIME_MICROSECONDS_FORMAT = "yyyy-MM-dd HH:mm:ss:SSS";
        public static final String DATE_TIME_MICROSECONDS_FORMAT_NOT_SEPARATOR = "yyyyMMddHHmmssSSS";
        public static final String DATE_TIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
        public static final String DATE_TIME_FORMAT_NOT_SEPARATOR = "yyyyMMddHHmmss";
        public static final String DATE_FORMAT = "yyyy-MM-dd";
        public static final String DATE_FORMAT_SLASH = "yyyy/MM/dd";
        public static final String TIME_FORMAT = "HH:mm:ss";
        public static final String TIME_MICROSECONDS_FORMAT = "HH:mm:ss:SSS";
    }

    class ImageType {
        public static final String PNG = "png";
        public static final String PNG_SUFFIX = ".png";
        public static final String JPG = "jpg";
        public static final String JPG_SUFFIX = ".jpg";
        public static final String JPEG = "jpeg";
        public static final String JPEG_SUFFIX = ".jpeg";
        public static final String GIT = "gif";
        public static final String GIF_SUFFIX = ".gif";
        public static final String SVG = "svg";
        public static final String SVG_SUFFIX = ".svg";
    }

    class Other {
        public static final String ALL = "all";
    }

    /**
     * 禁用启用常量
     */
    class Status {
        public static final Boolean ENABLE = true;
        public static final Boolean DISABLE = false;
    }

    /**
     * 常见协议前缀
     */
    class ProtocolPrefix {
        public static final String HTTP = "http://";
        public static final String HTTPS = "https://";
        public static final String FTP = "ftp://";
        public static final String SFTP = "sftp://";
        public static final String FILE = "file://";
    }

    /**
     * 常见分隔符常量
     */
    class Separator {
        private static final String COMMA = ",";
        private static final String JOINT_MARK = "&";
        private static final String QUESTION_MARK = "?";
        private static final String EQUAL_MARK = "=";
        private static final String UNDERLINE = "-";
    }

    class Basic {
        /**
         * map容器的初始化容量
         */
        public static final Integer INIT_CAPACITY = 16;

        /**
         * 常见的缓存KEY前缀
         */
        public static final String USER_TOKEN_PREFIX = "user:token:";
    }




}
